<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="utf-8">
    <title>新书推荐</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/AdminLTE.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pagination.css">
    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/js/pagination.js"></script>
    <script src="${pageContext.request.contextPath}/js/my.js"></script>
</head>
<body class="hold-transition skin-red sidebar-mini">
<!--数据展示头部-->
<div class="box-header with-border">
    <h3 class="box-title">删除信息</h3>
</div>
<!--数据展示头部-->
<!--数据展示内容区-->
<div class="box-body">
    <!-- 数据表格 -->
    <table id="dataList" class="table table-bordered table-striped table-hover dataTable text-center">
        <thead>
        <tr>
            <th class="sorting">药品编号</th>
            <th class="sorting">药品名称</th>
            <th class="sorting">服用方法</th>
            <th class="sorting">功效</th>
            <th class="sorting">单价</th>
            <th class="sorting">库存</th>
            <th class="text-center">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${view}" var="view">
            <tr>
                <td> ${view.mid}</td>
                <td>${view.name}</td>
                <td>${view.mode}</td>
                <td>${view.efficacy}</td>
                <td>${view.price}</td>
                <td>${view.count}</td>
                <td>
                    <button type="button" class="btn bg-olive btn-xs" onclick="deleteByMId(${view.mid})">删除信息</button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <!-- 数据表格 /-->
    <%--分页插件--%>
    <div id="pagination" class="pagination"></div>
</div>
<!-- 数据展示内容区/ -->
</body>
<script>
    /*分页插件展示的总页数*/
    pageargs.total = Math.ceil(${myTotal}/${myPageSize})
    pageargs.pagesize=${myPageSize}
        /*分页插件当前的页码*/
        pageargs.cur = ${pageNum}
            /*分页插件页码变化时将跳转到的服务器端的路径*/
            pageargs.gourl = "${gourl}"
    /*保存搜索框中的搜索条件，页码变化时携带之前的搜索条件*/
    /*分页效果*/
    pagination(pageargs);
</script>
</html>
